
use mongodb::bson::{Document, doc};
mod config;
mod db;
mod bina;
mod compute;

fn main() {
    println!("Hello, world!");
    log4rs::init_file("./config/log4rs.yaml", Default::default()).unwrap();

    let config = config::init_config(String::from("./config/config.json"));
    println!("config: {:?}", config);

    let db1 = db::init_db(config.mongodb.db_url, config.mongodb.db_name).unwrap();
    let docs = db1.find_by_filter(doc!{}).unwrap();

    for doc in docs {
        println!("doc: {:?}", doc);
    }




}
